package tjut.Control;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import tjut.Bean.UseBean;
import tjut.Service.impl.IUseInfoService;
@Controller("usControl")
public class UseInfoControl {
	//组合一个service层，进行注入
    @Resource
	private IUseInfoService useService;
    
    @RequestMapping(value="/login",method=RequestMethod.POST)
	public String doLogin(String userName,Model model){
		System.out.println("正在进行登录处理。。。");
		UseBean useE=useService.selectUseInfo(8);
		String strName=(useE==null?"":useE.getUse_name());
		
		System.out.println("数据库查询的用户信息为："+strName);
		model.addAttribute("loggerName", strName);
		return "logined";
	}
	
}
